/**
 * cesiumStateTuiyan
 */
import { defineStore } from "pinia";
import { ref, computed } from "vue";
import { CustomViewer } from "@@/utils/CustomCesium/CustomCesium";

export interface CesiumStateTuiyan {
  customViewer: CustomViewer | null;
}

export const cesiumStateTuiyan = defineStore("cesium-store-tuiyan", () => {
  const customViewerTuiyan = ref<CustomViewer | null>(null);

  const getCustomViewerTuiyan = computed(() => customViewerTuiyan.value);

  function setCustomViewerTuiyan(viewer: CustomViewer | null) {
    customViewerTuiyan.value = viewer;
  }

  return {
    customViewerTuiyan,
    getCustomViewerTuiyan,
    setCustomViewerTuiyan
  };
});
// 向后兼容，提供与原名称相同的导出
export const useCesiumStore = cesiumStateTuiyan;
